﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.Commands;
using Microsoft.Practices.Prism.ViewModel;

namespace UI.Core.Base
{
    public abstract class BaseViewModel : NotificationObject
    {
        public BaseViewModel()
        {
            _unloadedCommand = new DelegateCommand(OnUnloaded);
            _loadedCommand = new DelegateCommand(OnLoaded);
        }

        private readonly DelegateCommand _loadedCommand;
        public DelegateCommand LoadedCommand
        {
            get { return _loadedCommand; }
        }
        protected virtual void OnLoaded()
        {

        }

        private readonly DelegateCommand _unloadedCommand;
        public DelegateCommand UnloadedCommand
        {
            get { return _unloadedCommand; }
        }
        protected virtual void OnUnloaded()
        {}
    }
}
